import { Pipe, PipeTransform } from "@angular/core";
const StringIsNumber = value => isNaN(Number(value)) === false;

@Pipe({
    name: 'enumToArray'
})
export class EnumToArrayPipe implements PipeTransform {
    transform(data: Object) {
        return Object.keys(data)
        .filter(StringIsNumber)
        .map(key => data[key]);
    }
}